<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="${rc.getContextPath()}/manage/log/hisLogList" onsubmit="return divSearch(this, 'jbsxBox');">
    <input type="hidden" name="navTabId" value="${navTabId!''}">
    <div class="pageHeader">
        <div class="searchBar">
            <ul class="searchContent">
                <li><label><@label key="userCode.C,colon">用户编码：</@label></label> <input type="text" name="userCode" value="${condition.userCode!''}" />
                </li>
                <li><label><@label key="userText.C,colon">用户描述：</@label></label> <input type="text" name="userText" value="${condition.userText!''}" />
                </li>
                <li><label><@label key="loginStatus.C,colon">登录状态：</@label></label> <select name="status">
                        <option value=""><@label key="all.C">所有</@label></option>
                        <option value="OK"<#if condition.status?? && condition.status == "OK"> selected="selected"</#if>><@label key="success.C">成功</@label></option>
                        <option value="FAIL"<#if condition.status?? && condition.status == "FAIL"> selected="selected"</#if>><@label key="fail.C">失败</@label></option>
                </select>
                </li>
            </ul>
            <ul class="searchContent" style="height: 30px;">
            <li><label><@label key="loginDateTime.C,colon">登录时间：</@label></label> 
                <input type="text" readonly="readonly" style="background-color:#fff;" name="fromDateTimeStr" max_Date="{toDateTimeStr}" dateFmt="yyyy-MM-dd HH:mm:ss" class="date" value="<#if (condition.fromDateTimeStr)??>${condition.fromDateTimeStr!''}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
                <li>
                <label><@label key="to.C,colon">至：</@label></label>
                <input  type="text" readonly="readonly" style="background-color:#fff;" name="toDateTimeStr"  min_Date="{fromDateTimeStr}"  dateFmt="yyyy-MM-dd HH:mm:ss" class="date" value="<#if (condition.toDateTimeStr)??>${condition.toDateTimeStr!''}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
                <li><label><@label key="ipAddress.C,colon">IP地址：</@label></label> <input type="text" name="ipAddress" value="${condition.ipAddress!''}" />
            </ul>
            <ul class="searchContent" style="height: 30px;">
                </li>
                <li><label><@label key="macAddress.C,colon">MAC地址：</@label></label> <input type="text" name="macAddress" value="${condition.macAddress!''}" />
                </li>
                <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit"><@label key="query.B">查询</@label></button>
                            </div>
                        </div>
                    </li>
            </ul>
        </div>
    </div>
<div class="pageContent">
<div class="panelBar">
   <ul class="toolBar">
            <li><a class="delete" target="selectedTodo" postType="string" rel="ids" href="${rc.getContextPath()}/manage/log/deleteLog?rel=jbsxBox" title="<@label key="confirmDelLog.M">确认要删除勾选的日志数据吗？</@label>"><span><@label key="delete.B">删除</@label></span>
            </a>
            </li>
        </ul>
    </div>
        <table class="table" width="100%" layoutH="247" rel="jbsxBox">
            <thead>
                <tr>
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl">
                </th>
                    <th width="100" orderField="userCode"<#if (page.orderField?? && page.orderField == 'userCode')>class="${page.orderDirection!''}"</#if>><@label key="userCode.C">用户编码</@label></th>
                    <th width="100" orderField="userText"<#if (page.orderField?? && page.orderField == 'userText')>class="${page.orderDirection!''}"</#if>><@label key="userText.C">用户描述</@label></th>
                    <th width="100" orderField="loginDateTime"<#if (page.orderField?? && page.orderField == 'loginDateTime')>class="${page.orderDirection!''}"</#if>><@label key="loginDateTime.C">登录时间</@label></th>
                    <th width="100" orderField="logoutDateTime"<#if (page.orderField?? && page.orderField == 'logoutDateTime')>class="${page.orderDirection!''}"</#if>><@label key="logoutDateTime.C">注销时间</@label></th>
                    <th width="50" orderField="status"<#if (page.orderField?? && page.orderField == 'status')>class="${page.orderDirection!''}"</#if>><@label key="loginStatus.C">登录状态</@label></th>
                    <th width="70" orderField="onlineTime"<#if (page.orderField?? && page.orderField == 'onlineTime')>class="${page.orderDirection!''}"</#if>><@label key="onlineTime.C">在线时长(分钟)</@label></th>
                    <th width="100" orderField="sessionId"<#if (page.orderField?? && page.orderField == 'sessionId')>class="${page.orderDirection!''}"</#if>><@label key="sessionId.C">会话ID</@label></th>
                    <th width="100" orderField="ipAddress"<#if (page.orderField?? && page.orderField == 'createUser')>class="${page.orderDirection!''}"</#if>><@label key="ipAddress.C">IP地址</@label></th>
                    <th width="120" orderField="macAddress"<#if (page.orderField?? && page.orderField == 'createDateTime')>class="${page.orderDirection!''}"</#if>><@label key="macAddress.C">MAC地址</@label></th>
                </tr>
            </thead>
            <tbody>
                <#if page??><#if (page.data?size>0)> <#list page.data as log>
                <tr target="log_code" rel="${log.id!''}">
                <td><input name="ids" value="${log.id!''}" type="checkbox">
                </td>
                    <td>${log.userCode!''}</td>
                    <td>${log.userText!''}</td>
                    <td><#if (log.loginDateTime??)>${log.loginDateTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
                    <td><#if (log.logoutDateTime??)>${log.logoutDateTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
                    <td><#if log.status == "OK"><@label key="success.C">成功</@label><#else><@label key="fail.C">失败</@label></#if></td>
                    <td>${log.onlineTime!''}</td>
                    <td>${log.sessionId!''}</td>
                    <td>${log.ipAddress!''}</td>
                    <td>${log.macAddress!''}</td>
                </tr>
                </#list> <#else>
                <tr target="log_id">
                            <td colspan="6" class="noData">======<@label key="noListData.C">列表无数据</@label>=====</td>
                </tr>
                </#if> <#else>
                <tr target="log_id">
                        <td colspan="6" class="noData">======<@label key="noListData.C">列表无数据</@label>=====</td>
                </tr>
                </#if>
            </tbody>
        </table>
        <div class="panelBar">
            <#if page??>
                <div class="pages">
            <span><@label key="pagePanelShow.C">显示</@label></span> <select class="combox" name="numPerPage"
                onchange="navTabPageBreak({numPerPage:this.value},'jbsxBox')"> <#list
                [10,20,30,50,100,200] as page_size> <#if
                (page.numPerPage)==page_size>
                <option value="${page_size}" selected="selected">${page_size}</option>
                <#else>
                <option value="${page_size}">${page_size}</option> </#if> </#list>
            </select> <span><@label key="pagePanelMiddle.C">共</@label></span><span> <#if page.totalCount??>${page.totalCount?c}<@label key="item.C">条</@label></span></#if>
        </div>

            <div class="pagination" rel="jbsxBox" totalCount="<#if page.totalCount??>${page.totalCount?c}</#if>" numPerPage="<#if page.numPerPage??>${page.numPerPage?c}</#if>" pageNumShown="5" currentPage="<#if page.pageNum??>${page.pageNum?c}</#if>"></div>
            </#if>
        </div>
    </div>
</form>